This repository was archived by the owner on Jan 1, 2021. It is now read-only.
Fix for #3860 (undo bug on create way)#33
Open
stevage wants to merge 3 commits intosystemed:masterfrom
Open
Conversation
Defines BeginWayAction as including node creation and way creation. When the second last node gets undone, the BWA gets split apart and the node creation is preserved, but repackaged as a CreatePOIAction. Ugh.
Turned out to be pretty hard to come up with a clean solution because the way is created before the user has chosen where the second node goes etc. Anyway, it works.
Owner
|
I have a branch to test this and looking at it properly is my next todo. :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This fixes the funniness around undo/redo for creating new ways:
"Click two or more points (=n) on map - a way connecting clicked points is being created. After (n-1) Undo's the way is gone, but the initial point still remains visible (a green dot) and the Undo button is already grayed out - one step got forgot.
It is possible to delete the point manually (red (x) button), but it should be also deleted by the n-th Undo."
My head hurts now. In an ideal world I would have squashed the three commits into one. I tried that, but Git growled at me and threatened to take my work and never give it back, so we compromised.